Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support custom VM domain #2911

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

feat: support custom VM domain #2911

wants to merge 22 commits into from

Conversation

moul
Copy link
Member

@moul moul commented Oct 5, 2024

Introducing the concept of "ChainDomain," a local primary domain for packages.

The next step, which will be another PR, is to ensure that we can launch a gnoland/gnodev instance while importing a local folder or using a genesis to preload packages from other domains. This will allow users to add packages only to the primary domain while accessing packages from multiple domains. The result will be a preview of the upcoming IBC era, where a single chain can add packages only to its domain but can fetch missing dependencies from other registered zones.

  • gnovm unaware of gno.land, just accepting valid domains
  • vmkeeper initialized with a domain
  • Stdlib to know the current primary domain + new std.ChainDomain
  • new unit tests around custom domains

Depends on #2910
Blocks a new PR that will add multidomain support.
Related with #2904 (comment)

@moul moul self-assigned this Oct 5, 2024
@github-actions github-actions bot added 📦 🤖 gnovm Issues or PRs gnovm related 📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related labels Oct 5, 2024
@moul moul changed the title dev/moul/gno domain feat: support custom VM domain Oct 5, 2024
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

Attention: Patch coverage is 94.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 60.97%. Comparing base (628f965) to head (f0b41df).

Files with missing lines Patch % Lines
gnovm/stdlibs/std/native.go 0.00% 2 Missing ⚠️
gno.land/pkg/sdk/vm/keeper.go 88.88% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2911   +/-   ##
=======================================
  Coverage   60.96%   60.97%           
=======================================
  Files         564      564           
  Lines       75273    75301   +28     
=======================================
+ Hits        45893    45915   +22     
- Misses      26009    26015    +6     
  Partials     3371     3371           
Flag Coverage Δ
contribs/gnodev 61.65% <100.00%> (+0.18%) ⬆️
contribs/gnofaucet 14.46% <ø> (ø)
gno.land 67.96% <95.00%> (+0.03%) ⬆️
gnovm 65.78% <90.00%> (+<0.01%) ⬆️
misc/genstd 80.54% <ø> (ø)
misc/logos 19.88% <ø> (ø)
tm2 62.10% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
@moul moul marked this pull request as ready for review October 6, 2024 09:27
@moul moul requested a review from thehowl as a code owner October 6, 2024 09:27
Comment on lines +227 to +228
// ChainDomain is the primary domain name for the chain and its packages.
ChainDomain string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why add this here instead of in genesis?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that I prefer your idea. I'm waiting for more feedback before making the change.

gno.land/pkg/sdk/vm/keeper.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: In Progress
Status: 🎯 Current Topics
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants